// app.js
App({
  onLaunch() {
    wx.cloud.init()
    wx.cloud.database().collection('users').get().then(res => {
      if(!res.data.length) {
        const pages = getCurrentPages();
        console.log(pages,'page')
        wx.navigateTo({
          url: '/pages/login/login?url=' + pages[0].route,
        })
      }
    })
  },
  globalData: {
    userInfo: null
  }
})
